This page last changed on Jan 02, 2007 by rosie@atlassian.com.

Once you attach a file, you can easily provide a link to it from the page.

While image attachments can be displayed in a page, other types of attachments can be referenced, like this:

What you need to type What you will get
[^Working with attachments.pdf] Working with attachments.pdf

Where:

'Working with attachments.pdf' is the name of the file you want to link to.

You can also use the Rich Text editor to link to an attachment.


Linking to an attachment in another page

You can link to any attachment on your site using the following syntax.

Attached to another page in the same space

[link alias|pagetitle^attachment.ext|link tip]

Attached to another page in another space

[link alias|spacekey:pagetitle^attachment.ext|link tip]

Optionally,

  • use an alias to refer to the attachment
  • provide a link tip for the link

Usage example:

This is a link to this page - myself

RELATED TYPES

Rich Text-Linking to an attachment
Displaying an Image
Attaching Files to a Page

Take me back to Confluence 2 Home

Is it possible to link to attachments in another page?

Posted by thomasvdv at Dec 15, 2005 12:17

Thomas,

Yes, it is possible to link to attachments anywhere on your site.

I have updated the documentation above. I hope it answers your questions.

Cheers,
Vidya

Posted by vidya at Dec 15, 2005 17:13

Is it possible to link to a specific version of an attachment?

Posted by ckrul at Feb 02, 2006 04:14

When I insert a link to a attachment, it works real fine.

But as soon as I edit the same page for a second time, the links change automatically from

[^Working with attachments.pdf] to [Working with attachments.pdf]

Seems like a bug to me!

Posted by tattva at Feb 03, 2006 03:33

Did you manage to find a solution to this?

Jon

Posted by jwilson@lohika.com at Feb 21, 2006 18:36

If the full URL is specified, you can specify a version like this:

http://confluence.atlassian.com/download/attachments/133726/view.gif?version=1

I don't know if it's possible to use wiki markup to do a similar thing...

Posted by gfraser at Feb 21, 2006 18:40

It's not -- at least with the version of Confluence we are using (1.4.4 build #221). I assumed it was possible, however, since when you link to an attachment using wiki markup, the link text shows this:

https://my.server.x/confluence/download/attachments/2946/my+attached+file.zip?version=1

Note the version information on the end of the link! This would naturally lead you to suspect that including another version is possible using wiki markup. However, I could not get this to work, and have resorted to using the 'full link method' you suggest.

This has obvious disadvantages, though, not least the fact that the tooltip on attachments linked in this way now says "Visit page outside Confluence"

Cheers,

 Ed

Posted by edbradburn at Mar 21, 2006 01:43

Vidya,

 the above works well with regular pages, but when I try to insert a link in a weblog entry to an attachment located on another confluence page, it does not work, e.g. "[Page^attachment.txt]". A page-link however, works: "[Page]".

Bug or Feature? Or have I missed something here?

Thanks
Andreas

Posted by adeimer at Mar 21, 2006 04:08

Just a minor comment: I would have found it helpful if this page would say that a link to an attachment will always open the latest version of the attachment if no explicit version number is specified.

Posted by davida at Sep 05, 2006 02:57

hello

Posted by zhaoxin@symbio.com.cn at Sep 05, 2006 22:50

Is it possible in  CALENDAR plugin to add  a link to an attachment.  for an event.

For example, If I am delivering a setup to a client, I would like to mark in my calendar that on December 4 I delivered a setup to the client along with the setup.exe.

Posted by dhondia at Dec 05, 2006 02:15

Confluence external links to attachments are very difficult to use because they require knowledge of arbitrary page IDs.

Example:

http://confluence.atlassian.com/download/attachments/133726/view.gif?version=1

How can any external program easily know that when it wants to link to the view.gif attachments on the "Home" page of the "DevTalk" wiki space, it needs to somehow know that is page 133726.  An alternative form of linking should also be offered:

http://confluence.atlassian.com/download/attachments/DevTalk/Home/view.gif?version=1

Also, this second type of URL is much easier to deal with when doing conversions from Twiki to Confluence, since they use a /pub/spacename/pagename/attachmentfilename    format for their links.

Posted by garnetr at Dec 11, 2006 22:47

Is it possible to insert a table of the attachments to the actual page? (e.g you can see from the page what the attachments without requesting to view the page's attachments)

Posted by oferb@expand.com at Dec 19, 2006 12:48

Obviously allowing the version to be specified would be nice, for example:

[^Working with attachments.pdf]
  to
[^Working with attachments.pdf#1]

or some tag to signify version number.

The long way would be to just link the entire shortcut, such as:

[http://confluence.atlassian.com/download/attachments/145958/Working+with+attachments.pdf?version=1]

One method might help others:

  • create Shortcut Link in Administration, such as:
    wikiattach => http://confluence.atlassian.com/download/attachments/
    
  • then use shortcut providing rest of link, such as:
    [145958/Working+with+attachments.pdf?version=1@wikiattach]
    

I assume this would then allow wikiattach to change URL/Port, but the rest of the link would stay the same.

Posted by kgossage at Jan 26, 2007 08:05
Document generated by Confluence on Feb 05, 2007 23:35